'use strict';

const { default: captain } = require("./model/captain");

/**
 * @param {Egg.Application} app - egg application
 */


module.exports = app => {
  const { router, controller } = app;
  const jwt = app.passport.authenticate('jwt', {
    session: false,
    successReturnToOrRedirect: null
  });
 
  router.get('/findallstudents', controller.home.findallstudents);
  router.post('/addstudent', controller.home.addstudent);
  router.get('/getmessage',controller.shipcaptain.getmes);
  router.get('/findalluser',jwt,controller.user.findalluser);
  router.post('/userlogin',controller.user.userLogin);
  router.post('/getuserarticle',controller.article.findUserArticle);
  router.post('/addarticle', controller.article.addArticle);
  router.post('/updatearticle', controller.article.updateArticle);
  router.get('/getarticlepicture',controller.article.getArticlePicture)
};
